<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>float</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            font-size: 32px;
            font-weight: bold;
        }
        div {
            color: white;
            text-align: center;
            line-height: 100px;
            width: 150px;
            height: 300px;
        }
        #box1 {
            background-color: red;
            /* 脱离父元素的文本流 */
            float: left;
            /* maring可以负的 */
            margin-left: 150px;
            /* display: inline; */
        }
        #box2 {
            background-color: green;
            float: right;
        }
        #box3 {
            background-color: blue;
            float: left;
            margin-left: -300px;
        }
    </style>
</head>
<body>
    <div id="box1">1</div>
    <div id="box2">2</div>
    <div id="box3">3</div>
</body>
</html>